package be.bonamis.umpire.ui.client;

import javax.inject.Inject;

import be.bonamis.umpire.ui.client.mvp.BootView;
import be.bonamis.umpire.ui.client.mvp.DispoView;
import be.bonamis.umpire.ui.client.mvp.HistoryView;
import be.bonamis.umpire.ui.client.mvp.LoginView;
import be.bonamis.umpire.ui.client.mvp.QuizView;
import be.bonamis.umpire.ui.client.mvp.WhoView;
import be.credoc.common.gwt.actions.client.ActionServiceWrapper;

import com.google.gwt.place.shared.PlaceController;
import com.google.gwt.place.shared.PlaceHistoryHandler;
import com.google.inject.Provider;
import com.google.web.bindery.event.shared.EventBus;

public class ClientFactory {

	private Provider<PlaceController> placeController;

	private Provider<PlaceHistoryHandler> placeHistoryHandler;

	private Provider<ActionServiceWrapper> actionServiceWrapper;

	private Provider<EventBus> eventBus;

	private Provider<LoginView> loginView;	
	
	private Provider<BootView> bootView;

	private Provider<DispoView> dispoView;
	
	private Provider<WhoView> whoView;
	
	private Provider<QuizView> quizView;
	
	private Provider<HistoryView> historyView;

	private Messages messages;

	public ClientFactory() {
	}

	@Inject
	public ClientFactory(Provider<PlaceController> placeController,
			Provider<PlaceHistoryHandler> placeHistoryHandler,
			Provider<ActionServiceWrapper> actionServiceWrapper, Provider<EventBus> eventBus,
			Provider<LoginView> loginView,			
			Provider<BootView> bootView,
			Provider<DispoView> dispoView, Provider<WhoView> whoView, Provider<QuizView> quizView,
			Provider<HistoryView> historyView,
			Messages messages) {

		this.placeController = placeController;
		this.placeHistoryHandler = placeHistoryHandler;
		this.actionServiceWrapper = actionServiceWrapper;
		this.eventBus = eventBus;
		this.loginView = loginView;		
		this.bootView = bootView;
		this.dispoView = dispoView;
		this.whoView = whoView;
		this.quizView = quizView;
		this.historyView = historyView;
		this.messages = messages;
	}

	public PlaceController getPlaceController() {
		return placeController.get();
	}

	public PlaceHistoryHandler getPlaceHistoryHandler() {
		return placeHistoryHandler.get();
	}

	public ActionServiceWrapper getActionServiceWrapper() {
		return actionServiceWrapper.get();
	}

	public EventBus getEventBus() {
		return eventBus.get();
	}

	public Messages getMessages() {
		return messages;
	}

	public LoginView getLoginView() {
		return loginView.get();
	}

	public DispoView getDispoView() {
		return dispoView.get();
	}
	
	public WhoView getWhoView() {
		return whoView.get();
	}
	
	public QuizView getQuizView() {		
		return quizView.get();
	}

	public HistoryView getHistoryView() {
		return historyView.get();
	}

	public BootView getBootView() {
		return bootView.get();
	}
	
}
